Next | Prev | Up | Top | Contents | Index

Creating an Inventory Entry

Device drivers supplied by Silicon Graphics add information to the hardware inventory table when they are called at their pfxinit() or pfxedtinit() entry points. One of these entry points is called by the IRIX kernel during bootstrap. (The small distinction between the two entry points is discussed in "Initialization Entry Points".)

The function that adds a row to the inventory table is add_to_inventory(). Its prototype is declared in the include file sys/invent.h. The function takes arguments that are scalar values corresponding to the fields of the inventory_t structure.

Note: In IRIX 6.2, the only valid inventory types and classes are those declared in sys/invent.h. Only those numbers can be decoded and displayed by the hinv command, which prints an error message if it finds an unknown device class, and which prints nothing at all for an unknown device type within a known class. There is no provision for adding new device-class or device-type values for third-party devices.

Warning: The driver interface to the hardware inventory will change in a release following IRIX 6.2. The add_to_inventory() function of IRIX 6.2 is not formally part of the device driver API, and a different function or functions will be used in a future release.


Next | Prev | Up | Top | Contents | Index